package com.crm.service.before_sale;

import com.crm.pojo.PlanDetail;
import com.crm.pojo.SaleChance;
import com.crm.pojo.SalePlan;
import com.crm.vo.Result;
import com.crm.vo.SalePlanDetailsVO;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Created by dr5hx on 2018/8/9
 */
public interface SalePlanService {
    //周昌的方法
    public List<SalePlan> showCustomerPlan(Long cid);

    /**
     * 根据id删除销售计划
     * @param planId
     * @return
     */
    public Result deleteSalePlanById(Long planId);

    /**
     * 分页展示销售计划列表
     * @param salePlan
     * @param curpage
     * @param pagesize
     * @param minMoney
     * @param maxMoney
     * @param createStartTime
     * @param createEndTime
     * @param updateStartTime
     * @param updateEndTime
     * @return
     */
    public List<SalePlan> getSalePlanList(SalePlan salePlan, int curpage, int pagesize,
                                          BigDecimal minMoney, BigDecimal maxMoney,
                                          Date createStartTime,Date createEndTime,
                                          Date updateStartTime,Date updateEndTime);

    /**
     * 获取销售计划总数量
     * @param salePlan
     * @param minMoney
     * @param maxMoney
     * @param createStartTime
     * @param createEndTime
     * @param updateStartTime
     * @param updateEndTime
     * @return
     */
    public Long getSalePlanCount(SalePlan salePlan,
                                 BigDecimal minMoney, BigDecimal maxMoney,
                                 Date createStartTime,Date createEndTime,
                                 Date updateStartTime,Date updateEndTime);

    /**
     * 展示一个销售计划对应的计划明细
     * @param planId
     * @return
     */
    public List<SalePlanDetailsVO> getSalePlanDetailsList(Long planId);

    /**
     * 添加一个销售计划
     * @param planName
     * @param userId
     * @param planCheck
     * @param strategyProduct
     * @param strategyPrice
     * @param expenseBudget
     */
    public SalePlan addSalePlan(String planName,BigDecimal userId,String planCheck,String strategyProduct,String strategyPrice,
                            BigDecimal expenseBudget,Date setTime,Date updateDate);


    /**
     * 添加计划明细
     * @param planDetail
     * @param id
     */
    public void addPlanDetails(PlanDetail planDetail,Long id);

    /**
     * 通过id查询计划
     * @param id
     * @return
     */
    public  SalePlan findOneSalePlanById(Long id);

    /**
     * 根据id获取一条计划明细
     * @param saleDetId
     * @return
     */
    public SalePlanDetailsVO getOnePlanDetails(Long saleDetId);

    /**
     * 保存修改的计划明细
     * @param planDetail
     * @return
     */
    public PlanDetail savePlanDetails(PlanDetail planDetail);


    /**
     * 获取一个计划下的明细列表
     * @param planId
     * @return
     */
    public List<SalePlanDetailsVO> getPlanDetailsList(Long planId);

    /**
     * 删除计划明细
     * @param saleDetId
     * @return
     */
    public Result deletePlanDetails(Long saleDetId);

    /**
     * 编辑计划
     * @param salePlan
     * @return
     */
    public Result editSalePlan(SalePlan salePlan);

    /**
     * 保存计划明细
     * @param list
     * @return
     */
    public  List<PlanDetail> savePlanDetails(List<PlanDetail> list);

    public Result newDeletePlanDetail(PlanDetail planDetail);


}


